// ************************* 78 character ruler *****************************
// N5700.h -- Agilent N5700 series power supply ICDC/VISA driver include file
//
// $Author: Rmuikku $
// $Header: /LTE/PAWF/SOURCES/N5700/N5700.h 1     26.02.09 9:34 Rmuikku $
// (c) 2005 Nokia Networks.
// ************************* 78 character ruler *****************************

#ifndef _N7500_DRV_H
#define _N7500_DRV_H

#include <vpptype.h>

#ifdef _VI_FUNC
   #undef _VI_FUNC
   #ifdef N7500_DRV_EXPORT
      #define _VI_FUNC __declspec( dllexport ) __stdcall
   #else               
      #define _VI_FUNC __declspec( dllimport ) __stdcall
   #endif
#endif

#if defined(__cplusplus) || defined(__cplusplus__)
extern "C" {
#endif

ViStatus _VI_FUNC N5700_Init (ViRsrc resourceName, ViBoolean IDQuery,
                    ViBoolean resetDevice, ViPSession instrumentHandle);
                    
/*------------------ Measure Queries --------------------------------------*/ 
ViStatus _VI_FUNC N5700_MeasureCurrent (ViSession instrumentHandle, ViReal64 *current);
ViStatus _VI_FUNC N5700_MeasureVoltage (ViSession instrumentHandle, ViReal64 *voltage);                   

/*------------------ Current Subsystem-------------------------------------*/
ViStatus _VI_FUNC N5700_SetCurrent(ViSession instrumentHandle, ViReal64 currentLevel);
ViStatus _VI_FUNC N5700_SetCurrentProtectionState(ViSession instrumentHandle, int state); 
ViStatus _VI_FUNC N5700_GetCurrentProtectionStatus (ViSession instrumentHandle, int *piOverCurrent);
   
/*------------------- Output Subsystem ------------------------------------*/
ViStatus _VI_FUNC N5700_SetOutputState (ViSession instrumentHandle, int outputState);
ViStatus _VI_FUNC N5700_ClearOutputProtection(ViSession instrumentHandle); 

/*------------------- Voltage SubSystem -----------------------------------*/
ViStatus _VI_FUNC N5700_SetVoltage(ViSession instrumentHandle, ViReal64 voltageLevel);
                                    
/*------------------- Utility Functions -----------------------------------*/
ViStatus _VI_FUNC N5700_WriteInstrData (ViSession instrumentHandle, ViString writeBuffer);
ViStatus _VI_FUNC N5700_ReadInstrData (ViSession instrumentHandle, ViInt32 numberBytesToRead, 
                        ViChar readBuffer[],ViInt32 *numBytesRead);

ViStatus _VI_FUNC N5700_Reset (ViSession instrumentHandle);
ViStatus _VI_FUNC N5700_Close (ViSession instrumentHandle);

ViStatus _VI_FUNC N5700_GetLastError (ViSession instrSession, ViInt32 errorCode, ViChar errorBuffer[]);

#if defined(__cplusplus) || defined(__cplusplus__)
}
#endif

#endif

// ************************* 78 character ruler *****************************
//                            End of header file
// **************************************************************************

